package book.manage.mapper;

import book.manage.entity.Book;
import book.manage.entity.Borrow;
import book.manage.entity.Student;
import org.apache.ibatis.annotations.*;
import java.util.List;

public interface BookMapper {
    @Insert("insert into student(name,sex,grade) values(#{name},#{sex},#{grade})")
    int addStudent(Student student);
    //                         因为desc是关键字要加 ` ` 不然会报错
    @Insert("insert into book(title,`desc`,price) values(#{title},#{desc},#{price})")
    int addBook(Book book);


    @Insert("insert into borrow(sid,bid) values(#{sid},#{bid})")
    int addBorrow(@Param("sid") int sid,@Param("bid") int bid);



//    查询

}
